<?php
declare (strict_types = 1);

namespace app\validate\api;

use app\validate\BaseValidate;
use think\Validate;

class Order extends BaseValidate
{
    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'products'=>'array|require',
        'address'=>'require',
        'pay_mode'=>'require|number',
        'delivery_type'=>'require|number',
        'order_type'=>'require|number',
        'time'=>'require|length:10'
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [];
}
